﻿using System;
using System.Drawing;
using System.Web.UI.WebControls;

namespace OneDayModel.Web
{
    public partial class RegistrationField : System.Web.UI.UserControl
    {
        public RegistrationField()
        {
//            lblCaption = new Label();
//            lblHint = new Label();
//            txtValue = new TextBox();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
         //   this.

        }

        public string Caption
        {
            get
            {
                return lblCaption.Text;
            }

            set
            {
                lblCaption.Text = value;
            }
        }

        public string Value
        {
            set
            {
                txtValue.Text = value;
            }

            get
            {
                return txtValue.Text;
            }
        }

        public string Hint
        {
            get
            {
                return lblHint.Text;
            }

            set
            {
                lblHint.Text = value;
            }
        }

        public bool Required
        {
            set
            {
                if (value)
                    lblCaption.ForeColor = Color.Red;
                else
                    lblCaption.ForeColor = Color.Black;
            }
        }
    }
}